package com.principle.visitor;

public class Client {
    public static void main(String[] args) {
        //创建 ObjectStructure
        ObjectStructure objectStructure = new ObjectStructure();

        objectStructure.attach(new Man());
        objectStructure.attach(new Woman());

        //成功
        Success success = new Success();
        objectStructure.exhibit(0,success);

        //失败
        Fail fail = new Fail();
        objectStructure.exhibit(1,fail);

        //待定
        objectStructure.attach(new Woman());
        objectStructure.exhibit(2,new NotBat());
    }
}
